package com.hyperfix.utils.common;

import java.util.Random;

/**
 * @author JiangChunYu
 * 2024/3/14
 */
public class RandomUtil {
    /**
     * 随机数生成器
     */
    private static final Random RNG = new Random();

    public static int nextRangeInt(int max, int min) {
        return RNG.nextInt(max - min + 1) + min;
    }

    public static double nextRangeDouble(double max, double min) {
        return RNG.nextDouble() * (max - min) + min;
    }
}
